Skip to main content

googleGetSignInIdToken

Type

handler

Summary

Returns an ID token that you can send to your server

Syntax

googleGetSignInIdToken()

Description

Use the googleGetSignInIdToken to obtain the the unique ID for the Google account of the authenticated user. If no user is authenticated then a 'Not authenticated' error is thrown.

note

In order to obtain an ID token for the authenticated user, the client id of the backend server must have been present in the "server-client-id" key of the options array passed to the googleSignIn handler. If it was not, then googleGetSignInIdToken returns empty.

note

If the "require-offline-access" key was present in the options array passed to the googleSignIn handler, then googleGetSignInIdToken returns empty. Use googleGetSignInServerAuthCode instead to configure offline access.

Examples

put googleGetSignInIdToken() into tTokenID

Value

NameTypeDescription

return

The googleGetSignInIdToken handler returns an ID token that you can send to your server.

handler: googleSignIn, googleGetSignInServerAuthCode

Compatibility and Support

OS

android